var News = require('../models/News');
var async = require('async');


module.exports.create = function(data,callback){

  News.find({where:{guid:data.guid}}).then(function(news){
    if(!news){
      try{
        News.create(data);
        callback(null);
      }catch(err){
        callback(err);
      }
    }else{
      callback(null);
      console.log('exist');
    }
  });
}


module.exports.update = function(){

}

module.exports.delete = function(){

}